package com.isoftstone.merchant.service.payment;

import com.isoftstone.common.Page;
import com.isoftstone.merchant.entity.payment.Payment;
import com.isoftstone.util.PageData;

import java.util.List;

/**
 * @Author: zhaojg
 * @Description
 * @Date: Created in 17:07 2017/12/9
 * @Modified by:
 */
public interface PaymentService {

    /**
     * 根据中银易商账户查询该登录用户的待缴费
     */
    List<Payment> delayPaymentlist(String openAccount, String feeId) throws Exception;

    /**
     * 根据中银易商账户查询该登录用户的已缴费
     *
     * @param openAccount
     * @return
     * @throws Exception
     */
    List<Payment> queryAlreadyPaymentOpenAccount(String openAccount, String feeId, String beginDate, String endDate) throws Exception;

    /*
    * 收费查询列表
    * */
    List<Payment> getmFeeUserlistPage(Page page) throws Exception;

    /*
    * 收费查询删除
    * */
    void deleteFormPayment(Long payId);

    /*
    * 催缴查询
    * */
    Payment getPaymentById(Long payId, Long projectId);

    /*
    * 修改催缴次数
    * */
    void editUrgeCnt(Payment payment);

    /*
    * 收费导出查询
    * */
    List<Payment> getPaymentListByExport(Payment payments);

    /*
    * 批量生成费用新增
    * */
    void addPaymentToBatch(Payment payment);

    /**
     * 为他人缴费详情查询
     */
    List<Payment> queryProjectDetail(String corpId, String projectId, String feeId) throws Exception;

    List<Payment> queryProjectDetailByStatus(String corpId, String projectId, String feeId, String status) throws Exception;

    /**
     * 缴纳党费
     */
    List<Payment> queryMemberShipDetail(String corpId, String projectId, String feeId) throws Exception;

    List<Payment> queryMemberShipDetailByStatus(String corpId, String projectId, String feeId, String status) throws Exception;

    /**
     * 根据csp对账文件的返回数据查询
     */
    Payment queryPaymentByPayIdAndFactAmt(Long payId, String factAmt) throws Exception;

    /**
     * 根据payId更新
     */
    void updatePaymentByPayId(Payment payment) throws Exception;

    void updatePayment(Long payId) throws Exception;

    void updatePaymentForIsSelect(Long payId) throws Exception;

    //线下收费专用begin
    List<Payment> getPaymentlistPage(Page page) throws Exception;

    List<Payment> getAllPayMentlistPage(List<Payment> paymentList) throws Exception;

    void underCharge(Payment payment) throws Exception;

    void addPayment(Payment payment) throws Exception;

    Payment getPayUserNumber(Page page) throws Exception;

    /**
     * 统计交易数
     *
     * @param params
     * @return
     */
    String countPayment(PageData params);

    String sumPayment(PageData params);

    //统计所有交易数
    Integer getAllPayNumber(Page page) throws Exception;

    //统计当天交易数
    Integer getTodayPayNumber(Page page) throws Exception;

    //签约客户数
    String countBindUser(PageData params);

    //统计所有交易金额
    Double getAllPayMoney(Page page) throws Exception;

    //统计当天交易金额
    Double getTodayPayMoney(Page page) throws Exception;

    Payment getPaymentByPayId(Long payId) throws Exception;

    //缴费时，根据payId和feeUserId查询缴费详细信息
    Payment queryPaymentByPayIdAndFeeUserId(Long payId, String feeUserId) throws Exception;

    //收费查询撤回
    void updatePaymentStatus(Payment payment) throws Exception;

    Double getTodayPayMoneys(PageData todayPageDate) throws Exception;

    Double getAllMoney(PageData allPageDate) throws Exception;

    Integer getTodayPayNumbers(PageData todayNumberPageDate) throws Exception;

    Integer getAllPayNumbers(PageData allNumberPageDate) throws Exception;
}
